import request from '@/sheep/request';

export default {
	// 预支付
	getList: (params) =>
		request({
			url: 'api/recruitment',
			method: 'GET',
			params,
			custom: {
				showLoading: true,
			},
		}),
	getPost: (params) =>
		request({
			url: 'api/post',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	getCompanyt: (params) =>
		request({
			url: 'api/company',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	getProjectt: (params) =>
		request({
			url: 'api/project',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	getBenefits: (params) =>
		request({
			url: 'api/social_benefits',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	listDetail: (params) =>
		request({
			url: 'api/recruitment/view',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	bm: (data) =>
		request({
			url: 'api/recruitment_apply/apply',
			method: 'POST',
			data,
			custom: {
				loadingMsg: true,
			},
		}),
	jiesuan: (params) =>
		request({
			url: 'api/payment_means',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	edit: (data) =>
		request({
			url: 'api/recruitment/edit',
			method: 'POST',
			data,
			custom: {
				loadingMsg: true,
			},
		}),
	releaseDetails: (params) =>
		request({
			url: 'api/recruitment/view',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	recruitmentAdd: (data) =>
		request({
			url: 'api/recruitment/add',
			method: 'POST',
			data,
			custom: {
				loadingMsg: true,
			},
		}),
	gangwei: (params) =>
		request({
			url: 'api/post',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	fuli: (params) =>
		request({
			url: 'api/social_benefits',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	bmList: (params) =>
		request({
			url: 'api/recruitment_apply',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	bmDetail: (params) =>
		request({
			url: 'api/recruitment_apply/view',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	cancelBmDetail: (params) =>
		request({
			url: 'api/recruitment_apply/cancel',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
	// 发起提现 
	withdraw: {
		list: (params) =>
			request({
				url: 'withdraw',
				method: 'GET',
				params,
				custom: {
					auth: true,
				},
			}),
		rules: () =>
			request({
				url: 'withdraw/rules',
				method: 'GET',
				custom: {
					auth: true,
				},
			}),
		apply: (data) =>
			request({
				url: 'withdraw/apply',
				method: 'POST',
				data,
				custom: {
					loadingMsg: '申请中',
					auth: true,
				},
			}),
	},
};